home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / util / wb / FullPalette21.lha / FullPalette / Install < prev    next >
Text File  |  1999-02-10  |  8KB  |  296 lines

  1. ;** $VER: FullPalette_install 40.2 (7.2.99) by Massimo Tantignone
  2. ;**
  3. ;** requires:
  4. ;** - RexxMast, Rx, Search and Version commands
  5. ;** - T: and ENV: assignments for temporary files
  6.  
  7. ;******************************
  8. ;** MESSAGES (DEFAULT: ENGLISH)
  9.  
  10. (set msg_rx     "Installer is unable to locate the \"Rx\" command")
  11. (set msg_rxm    "Installer is unable to locate the \"RexxMast\" command")
  12. (set msg_rxp    "Please locate it:")
  13. (set msg_wait   "Checking installation")
  14. (set msg_fpi    "A copy of FullPalette is already installed")
  15. (set msg_fpn    "FullPalette is not installed")
  16. (set msg_dir    "A drawer WILL NOT be created")
  17. (set msg_seldr  "Select the destination drawer:")
  18. (set msg_whdoc  "Where do you want to copy the documentation files?")
  19. (set msg_lang   "What language catalogs do you want to install?")
  20. ;(set msg_l_deu  "Deutsch")
  21. (set msg_l_ita  "Italiano")
  22. (set msg_icons  "Do you want to install icons?")
  23. (set msg_done   "FullPalette will be available next time you boot.")
  24. (set rxhelp     "Use the file requester to select the \"Rx\" program.")
  25. (set rxmhelp    "Use the file requester to select the \"RexxMast\" program.")
  26. (set dirhelp    "Select the drawer into which FPPrefs (the FullPalette daemon that is run in the Startup-sequence) is to be copied.")
  27. (set dirhelp2   "Select the drawer into which the documentation is to be copied.\nThe default is the same drawer which FPPrefs resides in.")
  28. (set langhelp   "Choose one or more languages for the FullPalette editor.\nYou can later select which one to use with the Locale preferences editor.")
  29. (set iconhelp   "If you select \"No\", your existing icons won't be overwritten.")
  30. (set var_docd   "DocsEnglish")
  31. (set var_docr   "FullPalette.guide")
  32.  
  33. ;**********************
  34. ;** MESSAGES (ITALIANO)
  35.  
  36. (if (= @language   "italiano")(
  37.    (set msg_rx     "Installer non è in grado di trovare il comando \"Rx\"")
  38.    (set msg_rxm    "Installer non è in grado di trovare il comando \"RexxMast\"")
  39.    (set msg_rxp    "Per favore, localizzatelo:")
  40.    (set msg_wait   "Verifica installazione")
  41.    (set msg_fpi    "Una copia di FullPalette è già installata")
  42.    (set msg_fpn    "FullPalette non è installato")
  43.    (set msg_dir    "NON verrà creato alcun cassetto")
  44.    (set msg_seldr  "Scegliere il cassetto di destinazione:")
  45.    (set msg_whdoc  "Dove volete che siano copiati i file della documentazione?")
  46.    (set msg_lang   "Per quali lingue deve essere installato un catalog?")
  47. ;   (set msg_l_deu  "Deutsch")
  48.    (set msg_l_ita  "Italiano")
  49.    (set msg_icons  "Volete installare le icone?")
  50.    (set msg_done   "FullPalette sarà disponibile dopo il prossimo reboot.")
  51.    (set rxhelp     "Usate il file requester per selezionare il programma \"Rx\".")
  52.    (set rxmhelp    "Usate il file requester per selezionare il programma \"RexxMast\".")
  53.    (set dirhelp    "Selezionare il cassetto in cui deve essere copiato FPPrefs (il demone di FullPalette che viene lanciato nella Startup-sequence).")
  54.    (set dirhelp2   "Selezionare il cassetto in cui deve essere copiata la documentazione.\nIl default è lo stesso cassetto in cui si trova FPPrefs.")
  55.    (set langhelp   "Scegliere una o più lingue per l'editor FullPalette.\nIn seguito si potrà scegliere quale usare con l'editor di preferenze Locale.")
  56.    (set iconhelp   "Selezionando \"No\" le vostre icone già esistenti non verranno sovrascritte.")
  57.    (set var_docd   "DocsItaliano")
  58.    (set var_docr   "FullPalette.guide")
  59. ))
  60.  
  61. ;************************
  62. ;** LOCATE AREXX PROGRAMS
  63.  
  64. (if (= 1 (exists "sys:rexxc/rx" (noreq)))
  65.    (set var_rx "sys:rexxc/rx")
  66.    (if (= 1 (exists "c:rx" (noreq)))
  67.       (set var_rx "c:rx")
  68.       (set var_rx
  69.          (askfile
  70.             (default "SYS:RexxC/Rx")
  71.             (help rxhelp)
  72.             (prompt msg_rx ".\n\n" msg_rxp)
  73.          )
  74.       )
  75.    )
  76. )
  77.  
  78. (set var_rxm (tackon (pathonly var_rx) "rexxmast"))
  79.  
  80. (if (= 0 (exists var_rxm (noreq)))
  81.    (if (= 1 (exists "sys:rexxc/rexxmast" (noreq)))
  82.       (set var_rxm "sys:rexxc/rexxmast")
  83.       (if (= 1 (exists "c:rexxmast" (noreq)))
  84.          (set var_rxm "c:rexxmast")
  85.          (if (= 1 (exists "sys:system/rexxmast" (noreq)))
  86.             (set var_rxm "sys:system/rexxmast")
  87.             (set var_rxm
  88.                (askfile
  89.                   (default "SYS:System/RexxMast")
  90.                   (help rxmhelp)
  91.                   (prompt msg_rxm ".\n\n" msg_rxp)
  92.                )
  93.             )
  94.          )
  95.       )
  96.    )
  97. )
  98.  
  99. (run var_rxm)
  100.  
  101. ;******************************
  102. ;** CHECK PREVIOUS INSTALLATION
  103.  
  104. (working "(" msg_wait ")")
  105.  
  106. (delete "t:installfp.rx" (optional force) (safe))
  107. (textfile
  108.    (safe)
  109.    (dest "t:installfp.rx")
  110.    (append (cat
  111.       "/* filter */\n"
  112.       "\n"
  113.       "pull string\n"
  114.       "\n"
  115.       "comment=pos(';',string)\n"
  116.       "if comment~==0 then string=trim(left(string,comment-1))\n"
  117.       "say right(string,length(string)-lastpos(' ',string))\n"
  118.    ))
  119. )
  120.  
  121. (delete "t:installfp.sh" (optional force) (safe))
  122. (textfile
  123.    (safe)
  124.    (dest "t:installfp.sh")
  125.    (append (cat
  126.       "delete force t:installfp.out\n"
  127.       "\n"
  128.       "search >t:installfp.out search FPPrefs S:Startup-sequence\n"
  129.       "if $RC eq 0\n"
  130.       "   setenv installfp_fp 1\n"
  131.       "   setenv installfp_fpp `" var_rx " <t:installfp.out t:installfp.rx`\n"
  132.       "else\n"
  133.       "   setenv installfp_fp 0\n"
  134.       "   setenv installfp_fpp \"\"\n"
  135.       "endif\n"
  136.       "delete t:installfp.out\n"
  137.       "\n"
  138.    ))
  139. )
  140.  
  141. (execute "t:installfp.sh" (safe))
  142. (delete "t:installfp.rx" (safe))
  143. (delete "t:installfp.sh" (safe))
  144.  
  145. (set var_fp (getenv "installfp_fp"))
  146. (set var_fpp (getenv "installfp_fpp"))
  147. (run "unsetenv installfp_fp")
  148. (run "unsetenv installfp_fpp")
  149.  
  150. (if (= 1 var_fp)
  151.    (
  152.       (set @default-dest (pathonly var_fpp))
  153.       (set msg_fp msg_fpi)
  154.    )
  155.    (set msg_fp msg_fpn)
  156. )
  157.  
  158. (complete 10)
  159.  
  160. (set no_break_warning
  161.    (askdir
  162.       (default @default-dest)
  163.       (help dirhelp)
  164.       (prompt (cat msg_fp ".\n" msg_dir ".\n\n" msg_seldr))
  165.    )
  166. )
  167. (set @default-dest (tackon no_break_warning ""))
  168.  
  169. (set docdir
  170.    (askdir
  171.       (default @default-dest)
  172.       (help dirhelp2)
  173.       (prompt (cat msg_whdoc "\n\n" msg_seldr))
  174.    )
  175. )
  176. (set docdir (tackon docdir ""))
  177.  
  178. ;*******************************
  179. ;** ASK INSTALLATION PREFERENCES
  180.  
  181. (complete 20)
  182.  
  183. (set var_lang
  184.    (askoptions
  185.       (prompt msg_lang)
  186.       (help langhelp)
  187.       (choices
  188.                msg_l_ita
  189. ;               msg_l_deu
  190.       )
  191.       (default 1)
  192.    )
  193. )
  194.  
  195. (complete 30)
  196.  
  197. (set var_icon
  198.    (askbool
  199.       (prompt msg_icons)
  200.       (help iconhelp)
  201.    )
  202. )
  203.  
  204. ;*************************
  205. ;** INSTALL FILES: FPPREFS
  206.  
  207. (complete 40)
  208.  
  209. (copyfiles
  210.    (source "FPPrefs")
  211.    (dest @default-dest)
  212.    (infos) (noposition)
  213. )
  214.  
  215. ;*******************************
  216. ;** INSTALL FILES: DOCUMENTATION
  217.  
  218. (complete 50)
  219.  
  220. (if (= 1 var_icon)
  221.    (
  222.       (copyfiles
  223.          (source (tackon var_docd var_docr))
  224.          (dest docdir)
  225.          (infos) (noposition)
  226.       )
  227.    )
  228.    (
  229.       (copyfiles
  230.          (source (tackon var_docd var_docr))
  231.          (dest docdir)
  232.       )
  233.    )
  234. )
  235.  
  236. ;***********************************
  237. ;** INSTALL FILES: FULLPALETTE-PREFS
  238.  
  239. (complete 60)
  240.  
  241. (copyfiles
  242.    (source "FullPalette")
  243.    (dest "SYS:Prefs/")
  244.    (noposition)
  245. )
  246.  
  247. (if (= 1 var_icon)(
  248.    (copyfiles
  249.       (source "FullPalette.info")
  250.       (dest "SYS:Prefs/")
  251.       (noposition)
  252.    )
  253. ))
  254.  
  255. ;**************************
  256. ;** INSTALL FILES: CATALOGS
  257.  
  258. (complete 70)
  259.  
  260. (if (bitand var_lang 1)
  261.    (
  262.       (copyfiles
  263.          (source "Catalogs/italiano/fullpalette.catalog")
  264.          (dest "LOCALE:Catalogs/italiano/")
  265.       )
  266.    )
  267. )
  268.  
  269. (if (bitand var_lang 2)
  270.    (
  271.       (copyfiles
  272.          (source "Catalogs/deutsch/fullpalette.catalog")
  273.          (dest "LOCALE:Catalogs/deutsch/")
  274.       )
  275.    )
  276. )
  277.  
  278. ;*******************
  279. ;** STARTUP-SEQUENCE
  280.  
  281. (complete 80)
  282.  
  283. (if (= 0 var_fp)
  284.    (
  285.       (run (cat "InstallTools/AddLine \"" @default-dest "\""))
  286.       (protect "S:Startup-sequence" "+srwd")
  287.    )
  288. )
  289.  
  290. ;*******
  291. ;** DONE
  292.  
  293. (complete 100)
  294. (exit msg_done)
  295.  
  296.